<?php defined('APP_PATH') or exit('Access Denied');?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>上传图片</title>
<link rel="stylesheet" type="text/css" href="vonuo/static/css/vonuo.css">
<script type="text/javascript" src="vonuo/static/js/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
	$("#filesubmit").click(function(){
		if($("input[name='upfile']").val() == ''){
			alert('请选择文件');
			return false;
		}
		if($("input[name='makethumb']").attr('checked') == true){
			if($("input[name='width']").val() == ''){
				alert('请输入缩略图宽度');
				$("input[name='width']").focus();
				return false;
			}
			if($("input[name='height']").val() == ''){
				alert('请输入缩略图高度');
				$("input[name='height']").focus();
				return false;
			}
		}
		$("form").submit();
	});
});
</script>
</head>

<body>
<div class="pic_shezhi_box">
	<table border="0" cellspacing="0" cellpadding="0" class="table_btm">
		<form action="<?php echo spUrl('upld','doup');?>" method="post" enctype="multipart/form-data">
		<tr><td><input name="upfile" type="file" class="blue_input" /></td></tr>
		<input type="hidden" name="formnum" value="<?php echo $formnum;?>" />
		<input type="hidden" name="callthumb" value="<?php echo $callthumb;?>" />
		<tr>
			<td>
				<label class="txt_s_blue">生成略缩图：</label><input name="makethumb" type="checkbox" <?php if($needthumb=='yes'){?>checked<?php }?> value="1" class="m_lr_5"/> 
				<label class="txt_s_blue">W：</label><input name="width" value="<?php echo $thumbConf['thumbw'];?>" type="text" class="blue_input input_w_40"/>
				<label class="txt_s_blue">H：</label><input name="height" value="<?php echo $thumbConf['thumbh'];?>" type="text" class="blue_input input_w_40"/>
			</td>
		</tr>
		<tr><td><a href="javascript:;" id="filesubmit" class="btn_select">上 传</a></td></tr>
		</form>
	</table>
</div>
</body>
</html>